home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $VER: BLink 0.008 (18 Oct 1994) ***
- **
- ** (c) © 1994 Oliver Clouth
- **
- ** Function : BLink
- **
- **
- */
-
-
- OPTIONS RESULTS /* enable return codes */
-
- if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
- address 'GOLDED.1'
-
- 'LOCK CURRENT' /* lock GUI, gain access */
- OPTIONS FAILAT 6 /* ignore warnings */
- SIGNAL ON SYNTAX /* ensure clean exit */
-
- host = ADDRESS() /* get GED's port */
-
- /* ------------------------- INSERT YOUR CODE HERE: ------------------ */
-
-
- 'QUERY CAT'
- isGerman = (result = "deutsch")
-
- 'QUERY ANYTEXT'
-
- if (result = 'TRUE') then
-
- do
- 'QUERY DOC VAR OLDNAME' /* remember current file name */
-
- 'QUERY PATH Var PFAD'
- 'QUERY FILE VAR FNAME' /* Nur den Filenamen in Var FNAME */
-
- Name = left(FNAME, Pos('.', FNAME) - 1)
- InfoName = PFAD || '/' || Name
-
- call pragma 'D', PFAD /* Aktuelles Verzeichnis wechseln */
- call pragma 'Stack', 10000
-
- shell /* address shell */
-
- 'Oberon-A:C/BLink WITH Code/'Name'.with VERBOSE NODEBUG SMALLCODE SMALLDATA'
-
- ok = (RC = 0)
-
- shell /* address host (GoldED) */
-
- 'NAME NEW ' || oldname /* restore old file name */
-
- IF (ok) then
- do
-
- IF (isGerman) then
- 'REQUEST BODY="EXE Icon zuweisen ?" BUTTON="_Ja|_Nein" VAR ICON'
- ELSE
- 'REQUEST BODY="EXE Icon ?" BUTTON="_Yes|_No" VAR ICON'
-
-
- IF (ICON) then do
- shell /* address shell */
- 'Copy GoldED:Arexx/Oberon-A/exe.info to' InfoName'.info'
- shell /* address host (GoldED) */
- END;
-
- IF (isGerman) then
- 'REQUEST BODY="Oberon fertig.|Program _'Name'_ starten ?" BUTTON="_starten|_abbrechen" VAR Pro'
- ELSE
- 'REQUEST BODY="Oberon done.|Run program _'Name'_?" BUTTON="_run|_cancel" VAR Pro'
-
- IF (Pro) then
- do
- 'QUERY CON VAR CON'
- shell
- Name
- shell
- END;
- END;
- end
-
- ELSE
- do
-
- if (isGerman) then
- 'REQUEST BODY="Kein Text vorhanden ?!"'
- else
- 'REQUEST BODY="Text buffer is empty ?!"'
- end
-
- 'UNLOCK' /* VERY important: unlock GUI */
- Exit
-